<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\News */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="news-form box box-primary">
    <?php $form = ActiveForm::begin(); ?>
    <div class="box-body table-responsive">

        <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'author')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'category')->textInput() ?>

        <?= $form->field($model, 'brief_desc')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'desc')->textarea(['rows' => 6]) ?>

        <?= $form->field($model, 'cover')->textInput(['maxlength' => true]) ?>

        <?= $form->field($model, 'label')->textInput(['maxlength' => true]) ?>

       <!--  <?=$form->field($model, 'created_time')->widget(\kartik\date\DatePicker::className(), [
            'options' => ['placeholder' => ''],
            'pluginOptions' => [
                'autoclose' => true,
                'format' => 'yyyy-mm-dd',
                'startDate' => '01-Mar-2014',
                'todayHighlight' => true
            ]
        ])?>

        <?=$form->field($model, 'updated_time')->widget(\kartik\date\DatePicker::className(), [
            'options' => ['placeholder' => ''],
            'pluginOptions' => [
                'autoclose' => true,
                'format' => 'yyyy-mm-dd',
                'startDate' => '01-Mar-2014',
                'todayHighlight' => true
            ]
        ])?> -->

    </div>
    <div class="box-footer">
        <?= Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success btn-flat']) ?>
    </div>
    <?php ActiveForm::end(); ?>
</div>

<!-- js代码块 引入日期过滤插件-->
<?php $this->beginBlock('script') ?> 
  
<?php $this->endBlock() ?>

<?php //按需注入js, 放在</body>前面
// $this->registerJs($this->blocks['script'], \yii\web\View::POS_END);
 ?>
